<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core">
<h:head>
	<title>A Simple JavaServer Faces 2.0 View</title>
</h:head>
<h:body>
	<h:form id="mainForm">
		<h:panelGrid columns="3" id="selectGrid">
			<h:outputText value="A selectálandó entitás id-ja" />
			<h:inputText id="userId" value="#{isolationJSFBean.userId}">
				<f:validateLongRange minimum="1" maximum="100000000" />
			</h:inputText>
			<h:message for="userId" />

			<h:outputText value="Ennyi mp-ig várakozzunk a select után" />
			<h:inputText id="secondsToWait"
				value="#{isolationJSFBean.secondsToWait}">
				<f:validateLongRange minimum="1" maximum="100000000" />
			</h:inputText>
			<h:message for="secondsToWait" />
		</h:panelGrid>
		<h:commandButton value="Indít" onclick="document.getElementById('mainForm:statusMessage').innerHTML = ''">
			<f:ajax event="click" execute="selectGrid"
				listener="#{isolationJSFBean.startSelect}" render="statusMessage selectGrid"></f:ajax>
		</h:commandButton>
		<br />
		<h:outputText id="statusMessage"
			value="#{isolationJSFBean.selectStatusMessage}" />

		<h:panelGrid columns="3" id="updateGrid">
			<h:outputText value="Az updatelendő entitás id-ja" />
			<h:inputText id="upduserId" value="#{isolationJSFBean.userId}">
				<f:validateLongRange minimum="1" maximum="100000000" />
			</h:inputText>
			<h:message for="upduserId" />
			
			<h:outputText value="Az updatelendő User új neve" />
			<h:inputText id="upduserName" value="#{isolationJSFBean.newName}">
			</h:inputText>
			<h:message for="upduserName" />
		</h:panelGrid>
		<h:commandButton value="Indít" onclick="document.getElementById('mainForm:updStatusMessage').innerHTML = ''">
			<f:ajax event="click" execute="updateGrid"
				listener="#{isolationJSFBean.startUpdate}" render="updStatusMessage updateGrid"></f:ajax>
		</h:commandButton>
		<br />
		<h:outputText id="updStatusMessage"
			value="#{isolationJSFBean.updateStatusMessage}" />
	</h:form>
</h:body>
</html>
